package com.xjtu.weixin.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.xjtu.weixin.mapper.MpTemplateMapper;
import com.xjtu.weixin.model.entity.MpTemplate;
import com.xjtu.weixin.service.MpTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.RandomAccess;

/**
 * ${DESCRIPTION}
 *
 * @author 杨凯
 * @create 2018-09-05 10:19
 **/
@Slf4j
@Service
public class MpTemplateServiceImpl implements MpTemplateService {

	@Autowired
	private MpTemplateMapper templateMapper;


	@Override
	public List<MpTemplate> getTemplateList() {
		return templateMapper.selectList(new EntityWrapper<>());
	}

	@Override
	public void addTemplate(MpTemplate template) {
		templateMapper.insert(template);
	}
}
